home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsplugin.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  185 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. ////////////////////////////////////////////////////////////////////////////////
  39. /**
  40.  * <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
  41.  *
  42.  * <P>This superscedes the old plugin API (npapi.h, npupp.h), and 
  43.  * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
  44.  * get linked with the plugin. You will however need to link with the "backward
  45.  * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
  46.  * browsers. 
  47.  *
  48.  * <P>This is the master header file that includes most of the other headers
  49.  * you'll need to write a plugin.
  50.  */
  51. ////////////////////////////////////////////////////////////////////////////////
  52.  
  53. /**
  54.  * The following diagram depicts the relationships between various objects 
  55.  * implementing the new plugin interfaces. QueryInterface can be used to switch
  56.  * between interfaces in the same box:
  57.  *
  58.  *
  59.  *         the plugin (only 1)                        
  60.  *  +----------------------+                                             
  61.  *  | nsIPlugin or         |<- - - - - -NSGetFactory()
  62.  *  +----------------------+                                            
  63.  *    |
  64.  *    |                                                                  
  65.  *    |              instances (many)
  66.  *    |          +-------------------+
  67.  *    |          | nsIPluginInstance |+
  68.  *    |          +-------------------+|
  69.  *    |            +------|-----------+
  70.  *    |                   |
  71.  *    | PLUGIN SIDE       |peer
  72.  *~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  73.  *    | BROWSER SIDE      |
  74.  *    |                   v
  75.  *    |     +---------------------------------+
  76.  *    |     | nsIPluginInstancePeer           |+
  77.  *    |     | nsIWindowlessPluginInstancePeer ||
  78.  *    |     | nsIPluginTagInfo                ||
  79.  *    |     | nsIPluginTagInfo2               ||
  80.  *    |     +---------------------------------+|                  
  81.  *    |       +--------------------------------+                  
  82.  *    |                                                
  83.  *    |                                                
  84.  *    v    the browser (only 1)                             
  85.  *  +---------------------+                                        
  86.  *  | nsIPluginManager    |                                        
  87.  *  | nsIPluginManager2   |                                        
  88.  *  | nsIFileUtilities    |                                        
  89.  *  | nsIPref             |                                        
  90.  *  | nsICacheManager ... |                            
  91.  *  +---------------------+                                        
  92.  */ 
  93.  
  94. #ifndef nsplugins_h___
  95. #define nsplugins_h___
  96. #include "nsIComponentManager.h"       // for NSGetFactory
  97.  
  98. ////////////////////////////////////////////////////////////////////////////////
  99. /**
  100.  * <B>Interfaces which must be implemented by a plugin</B>
  101.  * These interfaces have NPP equivalents in pre-5.0 browsers (see npapi.h).
  102.  */
  103.  
  104. /**                                                               
  105.  * A plugin object is used to create new plugin instances. It manages the
  106.  * global state of all plugins with the same implementation.      
  107.  */                                                               
  108. #include "nsIPlugin.h"
  109.  
  110. /**
  111.  * A plugin instance represents a particular activation of a plugin on a page.
  112.  */
  113. #include "nsIPluginInstance.h"
  114.  
  115. ////////////////////////////////////////////////////////////////////////////////
  116. /**
  117.  * <B>Interfaces implemented by the browser:
  118.  * These interfaces have NPN equivalents in pre-5.0 browsers (see npapi.h).
  119.  */
  120. ////////////////////////////////////////////////////////////////////////////////
  121.  
  122. /**
  123.  * The plugin manager which is the main point of interaction with the browser 
  124.  * and provides general operations needed by a plugin.
  125.  */
  126. #include "nsIPluginManager.h"
  127.  
  128. /**
  129.  * A plugin instance peer gets created by the browser and associated with each
  130.  * plugin instance to represent tag information and other callbacks needed by
  131.  * the plugin instance.
  132.  */
  133. #include "nsIPluginInstancePeer.h"
  134.  
  135. /**
  136.  * The nsIPluginTagInfo interface provides information about the html tag
  137.  * that was used to instantiate the plugin instance. 
  138.  *
  139.  * To obtain: QueryInterface on nsIPluginInstancePeer
  140.  */
  141. #include "nsIPluginTagInfo.h"
  142.  
  143. /**
  144.  * The nsIWindowlessPluginInstancePeer provides additional operations for 
  145.  * windowless plugins. 
  146.  *
  147.  * To obtain: QueryInterface on nsIPluginInstancePeer
  148.  */
  149. #include "nsIWindowlessPlugInstPeer.h"
  150.  
  151. ////////////////////////////////////////////////////////////////////////////////
  152. /**
  153.  * <B>Interfaces implemented by the browser (new for 5.0):
  154.  */
  155. ////////////////////////////////////////////////////////////////////////////////
  156.  
  157. /**
  158.  * The nsIPluginManager2 interface provides additional plugin manager features
  159.  * only available in Communicator 5.0. 
  160.  *
  161.  * To obtain: QueryInterface on nsIPluginManager
  162.  */
  163. #include "nsIPluginManager2.h"
  164.  
  165. /**
  166.  * The nsIFileUtilities interface provides operations to manage temporary
  167.  * files and directories.
  168.  *
  169.  * To obtain: QueryInterface on nsIPluginManager
  170.  */
  171. #include "nsIFileUtilities.h"
  172.  
  173. /**
  174.  * The nsIPluginTagInfo2 interface provides additional html tag information
  175.  * only available in Communicator 5.0. 
  176.  *
  177.  * To obtain: QueryInterface on nsIPluginTagInfo
  178.  */
  179. #include "nsIPluginTagInfo2.h"
  180.  
  181. #include "nsIOutputStream.h"
  182.  
  183. ////////////////////////////////////////////////////////////////////////////////
  184. #endif // nsplugins_h___
  185.